ActionController::Routing::Routes.draw do |map|

  map.resources :users
  map.resource  :session
  map.resource  :events
  map.resource  :places
  map.resource  :comments

  map.home         '',    :controller => 'site', :action => 'index'
  
  map.login        'login',    :controller => 'sessions', :action => 'new'
  map.logout       'logout',   :controller => 'sessions', :action => 'destroy'
  map.activate     'activate/:activation_code', :controller => 'users', :action => 'activate'
  map.signup       'signup',   :controller => 'users', :action => 'new'
  map.user_home    'user/:login',     :controller => 'users', :action => 'home'
  map.user_options 'update',  :controller => 'users', :action => 'update'
  
  map.event        'evento/:id', :controller => 'events', :action => 'show'
  map.event_comments  'evento/:id/comments', :controller => 'events', :action => 'comments'
  map.event_invite 'evento/invite/:id', :controller => 'events', :action => 'invite'

  map.accept_invitation 'i/:code', :controller => 'events', :action => 'accept_invitation'
  
  map.connect ':controller/:action/:id.:format'
  map.connect ':controller/:action/:id'

end
